<template>
	<view class="margin-tb-sm flex-row-bt">
		<view class="flex-row">
			<view class="vertical-line theme-bg-color"></view>
			<text class="text-lg margin-left-xs">{{title}}</text>
		</view>
		<view v-if="showMore" class="l-f text-low text-sm" @click="onMore">
			<view class="text-low">查看更多</view>
			<view class="iconfont icon-chakangengduo"></view>
		</view>
	</view>
</template>

<script lang="ts" setup>
	defineProps({
		title: {
			required: true,
			type: String,
		},
		showMore: {
			type: Boolean,
			default: true
		}
	});
	const emits = defineEmits(['more'])
	const onMore = () => {
		emits('more')
	}
</script>

<style scoped lang="scss">
.icon-chakangengduo {
	font-size: 26rpx;
	height: 32rpx;
	line-height: 36rpx;
}
</style>